package com.jron.cqiu.kernel.cmdline;

/**
 * Created by Intellij IDEA.
 *
 * @Author: Yejw
 * @Date: 2008-6-11
 * @Time: 19:29:18
 */
public class Exec {

    /**
     * 执行Command命令
     *
     * @param command
     * @return
     */
    public static void exec(String command) {
        try {
            Process p = Runtime.getRuntime().exec(command);
            p.waitFor();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * 执行Command命令
     *
     * @param command
     */
    public static void exec(ICommand command) {
        exec(command.key());
    }
}
